package com.dsj.gxrd.modules.activity.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dsj.gxrd.common.MyBaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author songpin566
 * @date 2023/10/20
 **/
@Data
@TableName("rd_approval")
@NoArgsConstructor
@AllArgsConstructor
public class RdApproval extends MyBaseEntity<Long> {

    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private Integer businessType;
    private Long businessId;
    private Integer status;
    private LocalDateTime approvalTime;
    private Long approvalUserId;
    private String approvalContent;
    private Integer delFlag;
    private String currentApprovalRole;
    private Integer isCurrent;

    public RdApproval(Integer businessType,
                      Long businessId,
                      Integer status,
                      Integer delFlag,
                      Integer isCurrent) {
        this.businessType = businessType;
        this.businessId = businessId;
        this.status = status;
        this.delFlag = delFlag;
        this.isCurrent = isCurrent;
    }

    public RdApproval(Integer businessType,
                      Long businessId,
                      Integer status,
                      Integer delFlag,
                      String currentApprovalRole,
                      Integer isCurrent) {
        this.businessType = businessType;
        this.businessId = businessId;
        this.status = status;
        this.delFlag = delFlag;
        this.currentApprovalRole = currentApprovalRole;
        this.isCurrent = isCurrent;
    }


}
